The present invention relates generally to computer systems and programs. More particularly, the present invention relates to a system and method that can provide a file format compatible with previous, active, and future versions of an application program.
Computer application programs are generally used to perform many computer processing tasks. An application program can be used to create and modify a data file, which stores information of a particular item for the application program. For example, a document can be created using a desktop publishing type application program. The document can contain many individual elements, such has headers, text, graphics, styles, fonts, etc. The publishing type application program can be used to create a data file that stores all of the information of that particular document.
Every application program that saves files on a computer system must determine what format in which to save data. There are many ways of saving data, ranging from saving out memory images of data to writing out data in an industry standard form. Additionally, computer application programs are continually being updated and changed to provide the latest features and technology available. The updates and changes are typically provided to end users by releasing an updated version of the application program. The file format used by the updated version of the application program needs to be compatible with previous and future versions. However, the updated version typically uses a different file format than previous versions, because new features in the updated version require new data to be written to the data file. Problems can arise between two different versions of the application program, because the different file format can prevent previous versions from being able to read the updated version""s files.
An xe2x80x9cobject,xe2x80x9d as used in this disclosure, refers to an entity that has characteristics and that is displayed by an application program, is part of an application program, or is part of the data stored/manipulated by the program. An example of an object displayed by an application program is a text box contained in a window of an application program into which a user can input text. The characteristics of the text box can include its color, the font of the text, and the point size of the text. An example of an object that is part of an application program is an in-memory representation of an animal, where its characteristics can include its color, number of legs, and whether it is a carnivore. This in-memory representation can be implemented as a data structure with the elements of the data structure storing the characteristics. An example of such a data structure is the C++ class data structure. The characteristics of an object are referred to as properties of the object. Each property of an object typically has a value. For example, the color property may have the value red.
An example of an object 100 is illustrated in FIG. 1. Object 100 can comprise a border 102 and text 104. Object 100 can have six properties for border 102 and text 104. Border 102 can have properties of border style and border size. Text 104 can have properties of font, text size, justification, and text style. The default values for border 102 and text 104 can be that the border style is solid, the border size is 4 point, the text font is Times New Roman, the text size is 20 point, the text justification is left, and the text style is non-italic.
In an application program, the default values of the objects and properties can be established during initial programming. During operation of the program, the default values can be changed and stored in the data file. For example, in a draw program that can display objects such as rectangles and triangles, a user can modify the objects"" properties. Returning to the example of FIG. 1, the properties of object 100 can be changed such that the solid border becomes a dashed border and the text style becomes italic. Later versions of the program can typically read the default values and the changes for each object. However, when later versions of the program are created, the file format typically differs from that of the previous version. Accordingly, the previous version cannot read files from the later version. Using the above example from the previous paragraph, a later version could include a new feature such as a shadow for object 100. The added feature requires new data to be written to the program""s files, thereby changing its format. The previous version cannot read the files of the later version containing the new data, because the file formats are different.
One conventional solution to the problem discussed above is to limit the new features of the updated version so that the file format remains compatible with previous versions. However, that solution can prevent the best product from being distributed to the user and can limit the overall function and performance of the program.
Another conventional solution to the problem discussed above is to create an adapter program that converts the old file from the previous version to a new file compatible with the updated version. The adapter program also can convert a new file to a file compatible with the previous version. However, that solution can be inconvenient for the user and can require a large amount of memory and processing time to convert the files. Furthermore, that solution can cause the user to lose important information needed by the newer version of the program when the file is saved by a previous version.
Therefore, there is a need in the art for an improved system and method that can provide a file format compatible with previous, current, and later versions of an application program. There is also a need in the art for an extensible file format that can allow new features to be added in future versions of an application program while remaining compatible with previous versions.
The present invention relates generally to a system and method for providing an extensible file format that can be compatible with previous, current, and future versions of an application program. The present invention is directed to an extensible file format that supports the addition of new features to future versions of the application program, while maintaining compatibility (without modification) with previous and/or current versions. Accordingly, the present invention can enable a software vendor to provide multiple version compatibility with the same files without limiting the features that can be added to future versions.
In one exemplary aspect, the present invention can comprise including file version watermarks in an original data file of an application program. The file version watermarks can be an element in the original data file that can indicate various properties of the original data file. For example, a high version watermark can be provided in the original data file to indicate the highest version of the application program used to save the file. A last version watermark can be provided in the original data file to indicate the last version of the application program used to save the file. A low version watermark can be provided in the original data file to indicate the lowest version of the application program used to save the file. A creation version watermark can be provided in the original data file to indicate the version of the application program that first created the file. An object version watermark can be provided in the original data file to indicate the highest version of the application program to write a particular object. Each file version watermark can indicate changes, additions, or deletions made to the file.
In another exemplary aspect, the present invention can comprise determining how to load or save the original data file based on the information provided in one or more file version watermarks. In one exemplary aspect, the present invention can determine whether the high version watermark in the file represents a newer version than the active version of the application program that is loading or saving the file. The high version watermark represents a newer version if the original data file has been saved by a newer version of the application program with respect to the active version. In that case, the present invention can determine whether the original data file contains information that is unknown to the active version. The unknown information can then be ignored by the active version of the application program and retained for use by newer (later) versions.
In another exemplary aspect, the present invention can determine whether the high version watermark in the file represents an older version than the active version of the application program that is loading or saving the file. The high version watermark represents an older version than the active version if the original data file has been saved by an older version of the application program with respect to the active version. In that case, the present invention can determine whether the active version contains new information that is based on old information in the original data file. The new information can then be updated based on the old information. Additionally, the new information can be saved for use by older (previous), active, and newer (later) versions by storing data in the format of the older version, as well as in the format of the active and newer versions.
According to another exemplary aspect of the present invention, the in-memory structure of the application program can be separated from the data file format. Accordingly, future versions of the application program can include many new features without changing the data file format. For example, structures can be moved around in memory to be more efficient for a certain processor type without being incompatible with a different version because of differing data file formats.
The present invention also can minimize the amount of memory and processing needed for loading and saving data files corresponding to different versions of an application program. The file version watermarks can identify particular information in a data file that corresponds to a different version. Accordingly, any processing or conversion can be performed on only the identified information.
Another exemplary aspect of the present invention incorporates an object property list (xe2x80x9cOPLxe2x80x9d) or an object property list array (xe2x80x9cOPL arrayxe2x80x9d) as the data file structure. An OPL or OPL array can allow xe2x80x9cround-trippingxe2x80x9d of unknown property data from future versions by propagating or returning the unknown data back to the saved data file. The OPL or OPL array can be loaded into memory. All of its properties that are known by a particular version of the application program can be overwritten as needed. The remaining properties (i.e., properties that are unknown to the particular version) were created by a newer version and can remain in the file untouched. For each memory structure saved in a data file, there can be an associated OPL or OPL array for saving that structure.
These and other aspects, objects, and features of the present invention will become apparent from the following detailed description of the preferred embodiments, read in conjunction with, and reference to, the accompanying drawings.